﻿CREATE TABLE [dbo].[QuanTri_PhanNhomMenu] (
    [ID]            INT IDENTITY (1, 1) NOT NULL,
    [MenuID]        INT NULL,
    [Cap]           INT NULL,
    [MenuCha]       INT NULL,
    [Quyen_CapNhat] BIT NULL,
    [Quyen_Xem]     BIT NULL,
    [Quyen_Xoa]     BIT NULL,
    [MaNhomMenuND]  INT NULL,
    [ThuTuXuatHien] INT NULL,
    [IDCN]          INT NULL,
    CONSTRAINT [PK__QuanTri___3214EC27534D60F1] PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_QuanTri_PhanNhomMenu_DanhMuc_Command] FOREIGN KEY ([IDCN]) REFERENCES [dbo].[DanhMuc_Command] ([IDCN]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_QuanTri_PhanNhomMenu_DanhMuc_Menu] FOREIGN KEY ([MenuID]) REFERENCES [dbo].[DanhMuc_Menu] ([MenuID]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_QuanTri_PhanNhomMenu_DanhMuc_NhomMenuNguoiDung] FOREIGN KEY ([MaNhomMenuND]) REFERENCES [dbo].[DanhMuc_NhomMenuNguoiDung] ([MaNhomMenuND]) ON DELETE CASCADE ON UPDATE CASCADE
);

